Optimal. Leaf size=64 \[ -\frac {b \tanh ^{-1}(\cos (e+f x))}{2 f}-\frac {a \cot (e+f x)}{f}-\frac {a \cot ^3(e+f x)}{3 f}-\frac {b \cot (e+f x) \csc (e+f x)}{2 f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 64, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.210, Rules used = {2827, 3852,
3853, 3855} \begin {gather*} -\frac {a \cot ^3(e+f x)}{3 f}-\frac {a \cot (e+f x)}{f}-\frac {b \tanh ^{-1}(\cos (e+f x))}{2 f}-\frac {b \cot (e+f x) \csc (e+f x)}{2 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2827
Rule 3852
Rule 3853
Rule 3855
Rubi steps
\begin {align*} \int \csc ^4(e+f x) (a+b \sin (e+f x)) \, dx &=a \int \csc ^4(e+f x) \, dx+b \int \csc ^3(e+f x) \, dx\\ &=-\frac {b \cot (e+f x) \csc (e+f x)}{2 f}+\frac {1}{2} b \int \csc (e+f x) \, dx-\frac {a \text {Subst}\left (\int \left (1+x^2\right ) \, dx,x,\cot (e+f x)\right )}{f}\\ &=-\frac {b \tanh ^{-1}(\cos (e+f x))}{2 f}-\frac {a \cot (e+f x)}{f}-\frac {a \cot ^3(e+f x)}{3 f}-\frac {b \cot (e+f x) \csc (e+f x)}{2 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 115, normalized size = 1.80 \begin {gather*} -\frac {2 a \cot (e+f x)}{3 f}-\frac {b \csc ^2\left (\frac {1}{2} (e+f x)\right )}{8 f}-\frac {a \cot (e+f x) \csc ^2(e+f x)}{3 f}-\frac {b \log \left (\cos \left (\frac {1}{2} (e+f x)\right )\right )}{2 f}+\frac {b \log \left (\sin \left (\frac {1}{2} (e+f x)\right )\right )}{2 f}+\frac {b \sec ^2\left (\frac {1}{2} (e+f x)\right )}{8 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.25, size = 61, normalized size = 0.95
method | result | size |
derivativedivides | \(\frac {a \left (-\frac {2}{3}-\frac {\left (\csc ^{2}\left (f x +e \right )\right )}{3}\right ) \cot \left (f x +e \right )+b \left (-\frac {\csc \left (f x +e \right ) \cot \left (f x +e \right )}{2}+\frac {\ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )}{2}\right )}{f}\) | \(61\) |
default | \(\frac {a \left (-\frac {2}{3}-\frac {\left (\csc ^{2}\left (f x +e \right )\right )}{3}\right ) \cot \left (f x +e \right )+b \left (-\frac {\csc \left (f x +e \right ) \cot \left (f x +e \right )}{2}+\frac {\ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )}{2}\right )}{f}\) | \(61\) |
risch | \(\frac {3 b \,{\mathrm e}^{5 i \left (f x +e \right )}+12 i a \,{\mathrm e}^{2 i \left (f x +e \right )}-4 i a -3 b \,{\mathrm e}^{i \left (f x +e \right )}}{3 f \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )^{3}}+\frac {b \ln \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )}{2 f}-\frac {b \ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )}{2 f}\) | \(98\) |
norman | \(\frac {-\frac {a}{24 f}-\frac {5 a \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{12 f}+\frac {5 a \left (\tan ^{6}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{12 f}+\frac {a \left (\tan ^{8}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{24 f}-\frac {b \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{8 f}+\frac {b \left (\tan ^{7}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{8 f}-\frac {b \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4 f}}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3} \left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}+\frac {b \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 f}\) | \(152\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 79, normalized size = 1.23 \begin {gather*} \frac {3 \, b {\left (\frac {2 \, \cos \left (f x + e\right )}{\cos \left (f x + e\right )^{2} - 1} - \log \left (\cos \left (f x + e\right ) + 1\right ) + \log \left (\cos \left (f x + e\right ) - 1\right )\right )} - \frac {4 \, {\left (3 \, \tan \left (f x + e\right )^{2} + 1\right )} a}{\tan \left (f x + e\right )^{3}}}{12 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 140 vs.
\(2 (63) = 126\).
time = 0.34, size = 140, normalized size = 2.19 \begin {gather*} -\frac {8 \, a \cos \left (f x + e\right )^{3} - 6 \, b \cos \left (f x + e\right ) \sin \left (f x + e\right ) + 3 \, {\left (b \cos \left (f x + e\right )^{2} - b\right )} \log \left (\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) \sin \left (f x + e\right ) - 3 \, {\left (b \cos \left (f x + e\right )^{2} - b\right )} \log \left (-\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) \sin \left (f x + e\right ) - 12 \, a \cos \left (f x + e\right )}{12 \, {\left (f \cos \left (f x + e\right )^{2} - f\right )} \sin \left (f x + e\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \sin {\left (e + f x \right )}\right ) \csc ^{4}{\left (e + f x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.49, size = 122, normalized size = 1.91 \begin {gather*} \frac {a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 3 \, b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 12 \, b \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) \right |}\right ) + 9 \, a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - \frac {22 \, b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 9 \, a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 3 \, b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + a}{\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3}}}{24 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 6.74, size = 111, normalized size = 1.73 \begin {gather*} \frac {3\,a\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{8\,f}+\frac {a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3}{24\,f}+\frac {b\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2}{8\,f}+\frac {b\,\ln \left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )}{2\,f}-\frac {{\mathrm {cot}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\,\left (3\,a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+b\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )+\frac {a}{3}\right )}{8\,f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________